class Player(object):
    # 初始化函数（构造函数）, self代表实例化对象tom
    def __init__(self, name, age, city):
        self.name = name
        self.age = age
        self.city = city

tom = Player('tom', 29, 'LA.')  # 类的实例化（创建对象）
print(tom.name, tom.age, tom.city)
print(tom.__dict__)  # __dict__：获取实例（对象）的所有属性

jerry = Player('jerry', 30, 'NY.')
jerry.name = 'jerry-aka'
print(jerry.name)